﻿using OdsServer.Common;
using StructureMap;
using OdsServer.Device.Core;

namespace OdsServer.Device
{
    public static class DeviceRepository
    {
        public static void Initialize()
        {
            IocHelper.SetupIoc();

#if DEBUG
            IocHelper.SetProfile(IocHelper.DebugProfile);
#else 
            IocHelper.SetProfile(IocHelper.ProductionProfile);
#endif

            ObjectFactory.AssertConfigurationIsValid();
        }

        public static IDeviceInteropAI GetDefaultDeviceInteropAI()
        {
            return ObjectFactory.GetInstance<IDeviceInteropAI>();
        }
    }
}